<html>
<head>
    <title>SystemUiHiderBase.java</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <style type="text/css">
        .ln { color: rgb(0,0,0); font-weight: normal; font-style: normal; }
        .s0 { color: rgb(0,0,128); font-weight: bold; }
        .s1 { }
        .s2 { color: rgb(128,128,128); font-style: italic; }
        .s3 { color: rgb(128,128,128); font-weight: bold; font-style: italic; }
        .s4 { color: rgb(0,0,255); }
    </style>
</head>
<BODY BGCOLOR="#ffffff">
<TABLE CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#C0C0C0">
    <TR>
        <TD>
            <CENTER>
                <FONT FACE="Arial, Helvetica" COLOR="#000000">
                    SystemUiHiderBase.java</FONT>
            </center>
        </TD>
    </TR>
</TABLE>
<pre>

<a name="l1"><span class="ln">1    </span></a><span class="s0">package </span><span class="s1">com.ibr.ticketmanagement.app.util; 
<a name="l2"><span class="ln">2    </span></a> 
<a name="l3"><span class="ln">3    </span></a></span><span class="s0">import </span><span
        class="s1">android.app.Activity;
<a name="l4"><span class="ln">4    </span></a></span><span class="s0">import </span><span
        class="s1">android.view.View;
<a name="l5"><span class="ln">5    </span></a></span><span class="s0">import </span><span
        class="s1">android.view.WindowManager;
<a name="l6"><span class="ln">6    </span></a> 
<a name="l7"><span class="ln">7    </span></a></span><span class="s2">/** 
<a name="l8"><span class="ln">8    </span></a> * A base implementation of {</span><span class="s3">@link <a
        href="SystemUiHider.java.html">SystemUiHider</a></span><span class="s2">}. Uses APIs available in all
<a name="l9"><span class="ln">9    </span></a> * API levels to show and hide the status bar. 
<a name="l10"><span class="ln">10   </span></a> */</span><span class="s1"> 
<a name="l11"><span class="ln">11   </span></a></span><span class="s0">public class </span><span
        class="s1">SystemUiHiderBase </span><span class="s0">extends <a
        href="SystemUiHider.java.html">SystemUiHider</a> </span><span class="s1">{
<a name="l12"><span class="ln">12   </span></a>    </span><span class="s2">/** 
<a name="l13"><span class="ln">13   </span></a>     * Whether or not the system UI is currently visible. This is a cached value 
<a name="l14"><span class="ln">14   </span></a>     * from calls to {</span><span
        class="s3">@link </span><span class="s2">#hide()} and {</span><span class="s3">@link </span><span
        class="s2">#show()}.
<a name="l15"><span class="ln">15   </span></a>     */</span><span class="s1"> 
<a name="l16"><span class="ln">16   </span></a>    </span><span
        class="s0">private boolean </span><span class="s1">mVisible = </span><span
        class="s0">true</span><span class="s1">;
<a name="l17"><span class="ln">17   </span></a> 
<a name="l18"><span class="ln">18   </span></a>    </span><span class="s2">/** 
<a name="l19"><span class="ln">19   </span></a>     * Constructor not intended to be called by clients. Use 
<a name="l20"><span class="ln">20   </span></a>     * {</span><span class="s3">@link <a
        href="SystemUiHider.java.html">SystemUiHider</a></span><span class="s2">#getInstance} to obtain an instance.
<a name="l21"><span class="ln">21   </span></a>     */</span><span class="s1"> 
<a name="l22"><span class="ln">22   </span></a>    </span><span class="s0">protected </span><span
        class="s1">SystemUiHiderBase(Activity activity, View anchorView, </span><span
        class="s0">int </span><span class="s1">flags) {
<a name="l23"><span class="ln">23   </span></a>        </span><span class="s0">super</span><span
        class="s1">(activity, anchorView, flags);
<a name="l24"><span class="ln">24   </span></a>    } 
<a name="l25"><span class="ln">25   </span></a> 
<a name="l26"><span class="ln">26   </span></a>    @Override 
<a name="l27"><span class="ln">27   </span></a>    </span><span class="s0">public void </span><span
        class="s1">setup() {
<a name="l28"><span class="ln">28   </span></a>        </span><span class="s0">if </span><span
        class="s1">((mFlags &amp; FLAG_LAYOUT_IN_SCREEN_OLDER_DEVICES) == </span><span
        class="s4">0</span><span class="s1">) {
<a name="l29"><span class="ln">29   </span></a>            mActivity.getWindow().setFlags( 
<a name="l30"><span class="ln">30   </span></a>                    WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN 
<a name="l31"><span class="ln">31   </span></a>                            | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, 
<a name="l32"><span class="ln">32   </span></a>                    WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN 
<a name="l33"><span class="ln">33   </span></a>                            | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); 
<a name="l34"><span class="ln">34   </span></a>        } 
<a name="l35"><span class="ln">35   </span></a>    } 
<a name="l36"><span class="ln">36   </span></a> 
<a name="l37"><span class="ln">37   </span></a>    @Override 
<a name="l38"><span class="ln">38   </span></a>    </span><span
        class="s0">public boolean </span><span class="s1">isVisible() {
<a name="l39"><span class="ln">39   </span></a>        </span><span class="s0">return </span><span
        class="s1">mVisible;
<a name="l40"><span class="ln">40   </span></a>    } 
<a name="l41"><span class="ln">41   </span></a> 
<a name="l42"><span class="ln">42   </span></a>    @Override 
<a name="l43"><span class="ln">43   </span></a>    </span><span class="s0">public void </span><span
        class="s1">hide() {
<a name="l44"><span class="ln">44   </span></a>        </span><span class="s0">if </span><span
        class="s1">((mFlags &amp; FLAG_FULLSCREEN) != </span><span class="s4">0</span><span
        class="s1">) {
<a name="l45"><span class="ln">45   </span></a>            mActivity.getWindow().setFlags( 
<a name="l46"><span class="ln">46   </span></a>                    WindowManager.LayoutParams.FLAG_FULLSCREEN, 
<a name="l47"><span class="ln">47   </span></a>                    WindowManager.LayoutParams.FLAG_FULLSCREEN); 
<a name="l48"><span class="ln">48   </span></a>        } 
<a name="l49"><span class="ln">49   </span></a>        mOnVisibilityChangeListener.onVisibilityChange(</span><span
        class="s0">false</span><span class="s1">);
<a name="l50"><span class="ln">50   </span></a>        mVisible = </span><span
        class="s0">false</span><span class="s1">;
<a name="l51"><span class="ln">51   </span></a>    } 
<a name="l52"><span class="ln">52   </span></a> 
<a name="l53"><span class="ln">53   </span></a>    @Override 
<a name="l54"><span class="ln">54   </span></a>    </span><span class="s0">public void </span><span
        class="s1">show() {
<a name="l55"><span class="ln">55   </span></a>        </span><span class="s0">if </span><span
        class="s1">((mFlags &amp; FLAG_FULLSCREEN) != </span><span class="s4">0</span><span
        class="s1">) {
<a name="l56"><span class="ln">56   </span></a>            mActivity.getWindow().setFlags( 
<a name="l57"><span class="ln">57   </span></a>                    </span><span
        class="s4">0</span><span class="s1">,
<a name="l58"><span class="ln">58   </span></a>                    WindowManager.LayoutParams.FLAG_FULLSCREEN); 
<a name="l59"><span class="ln">59   </span></a>        } 
<a name="l60"><span class="ln">60   </span></a>        mOnVisibilityChangeListener.onVisibilityChange(</span><span
        class="s0">true</span><span class="s1">);
<a name="l61"><span class="ln">61   </span></a>        mVisible = </span><span
        class="s0">true</span><span class="s1">;
<a name="l62"><span class="ln">62   </span></a>    } 
<a name="l63"><span class="ln">63   </span></a>} 
<a name="l64"><span class="ln">64   </span></a></span></pre>
</body>
</html>